package com.zhongfl.crm.model.boss;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * lx_order
 */
@Data
public class LxOrder {
    private Long id;

    /**
     * 励销交付订单id
     */
    private Long lxId;

    /**
     * 订单类型: opportunity | contract
     */
    private String orderType;

    /**
     * 励销订单title
     */
    private String title;

    /**
     * 励销签约渠道id
     */
    private Long customerId;

    /**
     * 励销签约渠道名称
     */
    private String customerName;

    /**
     * 励销贷款金额
     */
    private BigDecimal lxOrderAmount;

    /**
     * 励销销售id
     */
    private Long lxUserId;

    /**
     * boss订单号
     */
    private String orderNo;

    /**
     * 励销合同ID(贷款订单ID)
     */
    private Long lxContractId;

    /**
     * 删除标识: 0未删除 1已删除
     */
    private Byte deleted;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 最后更新人
     */
    private String modifiedBy;

    /**
     * 更新时间
     */
    private Date modifiedTime;

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof LxOrder)) {
            return false;
        }

        LxOrder target = (LxOrder) obj;
        if (this.getCustomerId().longValue() != target.getCustomerId()) {
            return false;
        }
        if (!this.getCustomerName().equals(target.getCustomerName())) {
            return false;
        }
        if (!this.getTitle().equals(target.getTitle())) {
            return false;
        }
        if (this.getLxOrderAmount().compareTo(target.getLxOrderAmount()) != 0) {
            return false;
        }
        if (this.getLxUserId().longValue() != target.getLxUserId()) {
            return false;
        }
        return true;
    }
}